﻿using RestSharp;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Ymatou.ServiceCenter;

namespace YmtAuth.Dto
{
    /// <summary>
    /// 风控记录
    /// </summary>
    public class SafeVerifyLogEntity
    {
        

        /// <summary>
        /// 安全策略类型; pc, app
        /// </summary>
        public string StrategyType { get; set; }

        /// <summary>
        /// 客户端应用ID（userservice.ymatou.com, etc）或应用分组（App、pc、MainSite, etc）
        /// </summary>
        public string AppSource { get; set; }

        /// <summary>
        /// 用户ID
        /// </summary>
        public int UserId { get; set; }

        /// <summary>
        /// 登录ID
        /// </summary>
        public string LoginId { get; set; }

        /// <summary>
        /// 登录IP
        /// </summary>
        public string LoginIp { get; set; }

        /// <summary>
        /// 设备号ID（IMEI, IDFA）
        /// </summary>
        public string DeviceId { get; set; }

        /// <summary>
        /// 设备号的标识（由个推服务器产生（通过app上的个推SDK获取），用于向设备推送消息）
        /// </summary>
        public string ClientId { get; set; }

        /// <summary>
        /// 安全认证类型
        /// </summary>
        public string AuthType { get; set; }

        /// <summary>
        /// 安全认证结果code
        /// </summary>
        public int ResponseCode { get; set; }

        /// <summary>
        /// 安全认证结果描述
        /// </summary>
        public string ResponseDesc { get; set; }


        /// <summary>
        /// IP区域，国家省份城市
        /// </summary>
        public string IpArea { get; set; }

        /// <summary>
        /// IP区域上次认证时间
        /// </summary>
        public DateTime? LastAuthTime { get; set; }

        /// <summary>
        /// 黑名单IP过期时间
        /// </summary>
        public DateTime? ExpiredTime { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime  { get; set; }

        /// <summary>
        /// 是否已解锁
        /// </summary>
        public bool IsBlocked { get; set; }

        public SafeVerifyLogEntity()
        {
            IsBlocked = true;
        }
    }
}
